/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac4.comun;

import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.text.NumberFormat;
import javax.swing.JOptionPane;

/**
 *
 * @author pguerreroj
 */
public class Utils {
    
    
    
    public static String formato(float a, int digitos){
        String b="";
        NumberFormat nf = NumberFormat.getInstance(); 
        //Establecemos el numero de decimales 
        nf.setMaximumFractionDigits(digitos); 
        //Convertimos el numero 
        b=nf.format(a);
        return b;
    }
    
    
    public static void shownError(String paramString) {
        JOptionPane.showMessageDialog(null, paramString, "Error", 0);
    }

    public static void shownError(String paramString1, String paramString2) {
        JOptionPane.showMessageDialog(null, paramString1, paramString2, 0);
    }

    
    
}
